unit PDFViewerForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, OleCtrls, FoxitPDFSDKProLib_TLB;

type
  TfrmPDFViewer = class(TForm)
    FoxitPDFSDK: TFoxitPDFSDK;
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
    FPDFFile: TFileName;
    procedure SetPDFFile(const Value: TFileName);

  public
    { Public declarations }
    procedure Init;

    property PDFFile:TFileName read FPDFFile write SetPDFFile;
  end;

var
  frmPDFViewer: TfrmPDFViewer;

implementation

{$R *.dfm}

{ TfrmPDFViewer }

procedure TfrmPDFViewer.FormShow(Sender: TObject);
begin
  Init;
end;

procedure TfrmPDFViewer.Init;
begin
   FoxitPDFSDK.ShowStatusBar(False);
   FoxitPDFSDK.ShowTitleBar(False);
   FoxitPDFSDK.ShowToolbarButton(0,False);
   FoxitPDFSDK.ShowToolbarButton(1,False);

   FoxitPDFSDK.OpenFile(FPDFFile,'');
end;

procedure TfrmPDFViewer.SetPDFFile(const Value: TFileName);
begin
  FPDFFile := Value;
end;

end.
